import request from '@/utils/request'
// 获取汽车列表
export const reqCardList = ({ page, pageSize, carNumber, personName, cardStatus }) => {
  return request('/parking/card/list', {
    params: {
      page,
      pageSize,
      carNumber,
      personName,
      cardStatus
    }
  })
}
// 添加汽车
export const reqAddCard = (data) => {
  return request('/parking/card', {
    method: 'post',
    data
  })
}
// 修改汽车,回显，根据id获取汽车信息
export const reqGetCardById = (id) => {
  return request.get(`/parking/card/detail/${id}`)
}
// 修改汽车
export const reqUpdateCard = (data) => {
  return request.put('/parking/card/edit', { data })
}

// 删除汽车
export const reqDeleteCard = (id) => {
  return request.delete('/parking/card/' + id)
}

// 批量删除汽车
export const reqDeleteCardList = (ids) => {
  return request.delete('/parking/card/' + ids.join(','))
}
